# Modified original work:
# Chris McClelland
#
# Top Level Makefile per design
#
# To add a new library, append the library's name to LIBS and add a 'module.mk' 
#   file to its directory - see the existing files for an example. 
# MAKE CERTAIN that the new lib name matchs the library's directory name!
#
TOP_LEVEL := nanocepterCtrl
#.DEFAULT_GOAL := $(TOP_LEVEL).bit
PART      := xc3s500e-4-fg320
VENDOR   := xilinx
FPGA     := xc3s500e-fg320-4
##SYNTH FLAGS
MAPFLAGS := -cm area -ir off -pr off -c 100
PARFLAGS := -w -ol high -t 1
TRCEFLAGS := -v 3 -s 4 -n 3 -fastpaths
##SYNTH FILES
UCF_FILE := $(TOP_LEVEL).ucf
UT_FILE := $(TOP_LEVEL).ut
XST_FILE := $(TOP_LEVEL).xst
##SRC DIRS
HDL_LIB   := ../../libraries
UTIL_LIB  := ../../util/synth
HDL       := vhdl
HDLS      := \
	src/$(TOP_LEVEL).vhd

LIBS      :=					\
	components				\
	seg7					\
	uartRadio				\
	vgaController 

libmks = $(patsubst %,$(HDL_LIB)/%/module.mk,$(LIBS)) 
mkfiles = makefile $(libmks) $(UTIL_LIB)/xilinx.mk

## Primary Targets
bit    : $(TOP_LEVEL).bit
report : $(TOP_LEVEL).twr
twr    : $(TOP_LEVEL).twr
edif   : $(TOP_LEVEL).edif 
prj    : $(TOP_LEVEL).prj

include $(libmks)
include $(UTIL_LIB)/$(VENDOR).mk

